{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import datetime\n",
    "import os\n",
    "import numpy as np\n",
    "from data_process import get_data, write_data\n",
    "from image_utils import plot_show\n",
    "from utils import train\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "os.environ[\"CUDA_VISIBLE_DEVICES\"] = \"1\"  # 使用CPU\n",
    "\n",
    "all_start = datetime.datetime.now()  # 程序开始运行\n",
    "\n",
    "# 超参数设定\n",
    "sample_size = 96  # 一次性学习的样本大小\n",
    "hidden = 100  # LSTM层的神经元个数\n",
    "batch_size = 1  # LSTM层的batch_size\n",
    "time_step = 96  # LSTM层的timestep\n",
    "learn_set = 400  # 迭代次数列表\n",
    "cond_dim = 2  # 条件值\n",
    "latent_dim = 1  # latent space 维度\n",
    "num_run = 1  # 运行的次数\n",
    "num_gen_once = 1  # 单次生成序列\n",
    "LR = 0.001  # 学习率\n",
    "# 数据处理部分\n",
    "data = '../data'  # 读取data文件夹内的数据集，数据集是一个月内的停车数据 每十五分钟取一个点，每天96个点\n",
    "sample_set, index, num_seq = get_data(data, sample_size)\n",
    "index_list = [i for i in range(num_seq)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "# 数据保存及可视化\n",
    "plot_show(learn_set, [], sample_set[0][0], cond_dim, num_run, num_gen_once)\n",
    "#write_data(g_data_, num_gen_once, sample_size, cond_dim, num_run)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
